# $Id: PKGBUILD 177998 2013-02-12 22:00:51Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=bluefish
pkgver=2.2.4
pkgrel=1
pkgdesc="A powerful HTML editor for experienced web designers and programmers"
arch=('i686' 'x86_64')
url="http://bluefish.openoffice.nl/"
license=('GPL3')
depends=('gtk3' 'enchant' 'python2' 'desktop-file-utils' 'hicolor-icon-theme')
makedepends=('gucharmap' 'intltool')
optdepends=('gucharmap: for using the charmap plugin')
options=('!libtool')
install=bluefish.install
source=(http://www.bennewitz.com/bluefish/stable/source/bluefish-${pkgver}.tar.bz2{,.sig})
sha1sums=('b65310617b5fd525a8c57f7681e023f6f4496378'
          '6ff0474602c520e2a638436c5423957cfe4be4d0')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \
    src/plugin_zencoding/zencoding/{,filters/,actions/}*.py \
    data/{cssmin.py,jsbeautify,jsmin.py,lorem-ipsum-generator}
    
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --enable-spell-check --disable-update-databases --disable-xml-catalog-update
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
